/* client1.c
 *	Simple program to test the network
 *      This is the client 1
 */

#include "syscall.h"


void Print(char* str){
  int c = 0;
  while((str[c] != '\n')){
    c++; 
  }
  c++;
  Write(str,c,ConsoleOutput);
	
}

int main() {
  /*Variable declaration*/
  int lock0, lock1;
  int cond0, cond1;
  int loop;
  int choice;

  /************************/
  /*Start test case1 *****/
  Print("***** Start Test 1 ********\n");
  Print("Client1: CREATE LOCK 0\n");
  lock0 = CreateLock(0);
 
  Print("Client1: ACQUIRE LOCK 0\n");
  Acquire(lock0);
  
 
  Print("Client1: RELEASE LOCK 0\n");
  Release(lock0);


  Print("Client1: CREATE LOCK 1\n");
  lock1 = CreateLock(1);
 
  Print("Client1: ACQUIRE LOCK 1\n");
  Acquire(lock1);
  
 

  Print("Client1: RELEASE LOCK 0\n");
  Release(lock0);
 

  Print("Done test case 1\n");


  Exit(0);
}
